package com.wchat.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wchat.bean.entity.UserGroups;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Set;

/**
 * @author : willian fu
 * @date : 2021/8/27
 */
public interface UserGroupsMapper extends BaseMapper<UserGroups> {

    @Select("SELECT group_id FROM user_groups WHERE user_id = #{userId}")
    Set<Integer> getUserGroups(@Param("userId") Integer userId);

}
